package com.ucode.model.cgms.convert;

import com.ucode.model.cgms.CgmsAfterSaleCompanionOrder;
import com.ucode.model.cgms.form.CgmsAfterSaleCompanionOrderApplyForm;
import com.ucode.model.cgms.vo.CgmsAfterSaleCompanionOrderVO;
import com.ucode.tool.base.Paginator;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 陪玩售后订单转换器
 * @author liliang
 * @date 2023-08-15
 */
@Mapper
public interface CgmsAfterSaleCompanionOrderConvert {

    CgmsAfterSaleCompanionOrderConvert INSTANCE = Mappers.getMapper(CgmsAfterSaleCompanionOrderConvert.class);

    /**
     * 将实体对象转换为VO对象
     * @param bean 实体对象
     * @return VO对象
     */
    CgmsAfterSaleCompanionOrderVO convert(CgmsAfterSaleCompanionOrder bean);

    /**
     * 将分页实体转换为分页VO
     * @param paginator 分页实体
     * @return 分页VO
     */
    Paginator<CgmsAfterSaleCompanionOrderVO> convertPage(Paginator<CgmsAfterSaleCompanionOrder> paginator);

    /**
     * 将申请表单转换为实体对象
     * @param form 申请表单
     * @return 实体对象
     */
    CgmsAfterSaleCompanionOrder convert(CgmsAfterSaleCompanionOrderApplyForm form);

    List<CgmsAfterSaleCompanionOrderVO> convertList(List<CgmsAfterSaleCompanionOrder> list);

}


